<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>

	<meta http-equiv="content-type" content="text/html" />
	<meta name="author" content="blog.anchen8.net" />

	<title>毕业生，你的选择</title>
    <link rel="stylesheet" type="text/css" href="css/register.css" />
    <script type="text/javascript" src="js/school.js"></script>
    <script type="text/javascript" src="js/home.js"></script>
    <script type="text/javascript" src="/Bys-Website/js/jQuery1.82.js"></script>
    <script type="text/javascript">
	$(document).ready(function() {
		$("#UnameExist").hide();
		$("#UemailExist").hide();
		
		//设置UserName是否已被注册
		$("#name").focus(function(){
			$("#UnameExist").hide();
			$("#Uname").show();
		});
		
		$("#name").blur(function(){
			$.post("CheckData",{
				method:0,
				RegistUserName:$("#name").val()
			},function(data){
				if(data=="have data"){
					$("#Uname").hide();
					$("#UnameExist").show();					
				}
			});
		});
		
		//设置EMAIL是否被注册
		$("#email").focus(function(){
			$("#UemailExist").hide();
			$("#Uemail").show();
		});
		
		$("#email").blur(function(){
			$.post("CheckData",{
				method:1,
				email:$("#email").val()
			},function(data){
				if(data=="have data"){
					$("#Uemail").hide();
					$("#UemailExist").show();					
				}
			});
		});
		
	});
	</script>
</head>
	<%String refuri = null;
if(request.getHeader("Referer")==null){
	refuri = "Public/PublicMainPage.jsp";
	}else{
		refuri = request.getHeader("Referer");
	}
if(request.getParameter("backuri")!=null){
	refuri = request.getParameter("backuri");
}
	%>
<body>
    <div class="topbar">
        <div class="toplogo">
            <img src="/Bys-Website/SourceImageFile/toplogo.jpg"/>
        </div>
        <div class="navi">
            <ul class="naviul">
                <li><a href="/Bys-Website/Public/Video.jsp" class="outli">视频</a></li>
				<li><a href="/Bys-Website/Public/Photo.jsp" class="outli">相册</a></li>
				<li><a href="/Bys-Website/Public/Blog.jsp" class="outli">博客</a></li>
            </ul>
        </div>
        <div class="loginfo">
            <ul class="loginfoul">
                <% if(session.getAttribute("pid")==null){%>
                <li><a href="/Bys-Website/Log_in.jsp">登录</a></li>
                <li><a href="/Bys-Website/Regist.jsp">注册</a></li>
                <%}else{
					String userID = session.getAttribute("pid").toString();%>
					<li><a href="/Bys-Website/PersonMainPage.jsp?userID=<%= userID %>"><%=session.getAttribute("username") %></a></li>     
					<li><a href="LoginServlet?method=1">退出</a></li>
				<%}%> 
            </ul>
        </div>
    </div>
    <div class="logo">
        <img src="/Bys-Website/SourceImageFile/logo.jpg" width="222px" height="37px"/>
    </div>
    <div class="welcome">
        <span>欢迎加入毕业生</span>
    </div>
    <br/>
    
    <div class="register">
        <div class="regtext1">
            <ul>
                <li><span>用户名</span></li>
                <li><span>密码</span></li>
                <li><span>邮箱</span></li>
                <li><span>年龄</span></li>
                <li><span>性别</span></li>
                <li><span>家乡</span></li>
                <li><span>学校</span></li>
                <li><span>年级</span></li>
            </ul>
        </div>
        <div class="reg">
            <form action="RegistServlet?refuri=<%= refuri %>" method="post" name="registForm">
                <ul>
                    <li><input type="text" name="RegistUserName" class="basic-input"/ id="name"></li>
                    <li><input type="password" name="RegistUserPassword" class="basic-input"/></li>
                    <li><input type="text" name="RegistUserEmail" class="basic-input"/ id="email"></li>
                    <li><input type="text" value=""	name="RegistAge" class="basic-input"/></li>
                    <li>
                        <input type="radio" name="RegistSex" value="男"/>男
                        <input type="radio" name="RegistSex" value="女"/>女
                    </li>
                    <li>
                        <select id="home" name="HomeProvince" class="">
                            <option value="">--选择省份--</option>
                            <script>listHome()</script>
                        </select>
                    </li>
                    <li class="listPro">
                        <select onchange="selectSchool(this)" id="province" name="RegistProvince" class="">
                            <option value="">--选择省份--</option>
                            <script>listPro()</script>
                        </select>
                        <select id="city" name="RegistCollege">
                            <option value="">--选择学校--</option>
                        </select>
                        <select name="RegistSchool">
                        	<option>--选择学院--</option>
                        	<option>软件学院</option>
                        	<option>计算机学院</option>
                        	<option>通信学院</option>
                        </select>
                    </li>
                    <li>
                        <select id="home" name="RegistGrade" class="">
                            <option value="">--选择年级--</option>
                            <option>2004</option>
                            <option>2005</option>
                            <option>2006</option>
                            <option>2007</option>
                            <option>2008</option>
                            <option>2009</option>
                            <option>2010</option>
                            <option>2011</option>
                            <option>2012</option>
                        </select>
                    </li>
                </ul>
                <div class="btn">
        			<input type="submit" value="注册" name="user_login" class="btn-submit" tabindex="5"/>
    			</div>
            </form>
        </div>
        
        <div class="regtext2">
            <ul>
                <li id="UnameExist">用户名已存在</li>
                <li id="Uname"><span>用户名长度5-25个字符，汉字为2个字符</span></li>
                <li><span>密码长度6-14位，字母区分大小写</span></li>
                <li id="Uemail"><span>请输入常用邮箱，用于找回用户名和密码</span></li>
                <li id="UemailExist">邮箱已被注册</li>
            </ul>
        </div>
        <div class="pic">
            <img src="/Bys-Website/SourceImageFile/pic.jpg"/>
        </div>
    </div>
</body>
</html>
	
	
	
	
	
	
	
	
	
	
	
	
